<include file="Public:header" />
<link rel="stylesheet" href="__PUBLIC__/css/class.public.css" />
<script src="__PUBLIC__/js/addResume.js"></script>

<style>
    body{overflow-y:hidden; }
    #main_pic_prev{width: 120px;height: 120px;border: 1px dashed #d3d3d6;}
    .add_body_title{
        margin:15px auto 30px auto;
    }
    .form-horizontal .control-label{
        text-align: right;
    }
    .fileinput-button1{
        position: relative;
        overflow: hidden;
    }
    .note-codable{
        display: none;
        width: 100%;
        padding: 10px;
        margin-bottom: 0;
        font-family: Menlo,Monaco,monospace,sans-serif;
        font-size: 14px;
        color: #ccc;
        background-color: #222;
        border: 0;
        -webkit-border-radius: 0;
        -moz-border-radius: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -ms-box-sizing: border-box;
        box-sizing: border-box;
        resize: none;
    }
    .timerinput{
        width:120px; display:inline;height: 32px;
    }
    .resume_area{
        width: 100%;
        height: 100%;
        resize: none;
        outline: none;
        padding: 20px;
        border: none;
    }

    .btn{
        line-height: 21px;
    }
    .form-control, .single-line{
        left: 0 !important;
    }
    .deletebtn{
        margin-bottom: 10px;
    }
    .btnclosee{
        position: absolute;
        right: 30px;
        top:10px;
    }
    .submitfiles{
        padding-left: 15px;
    }
    .youzhi input{
        content: "";
        display: inline-block;
        width: 17px;
        height: 17px;
        margin-left: -20px;
        border: 1px solid #cccccc;
        border-radius: 3px;
        background-color: #fff;
    }
   .fileinput > input[type="file"] {
       opacity: 0;
       position: relative;
       top: -33px;
       width: 110px;
   }
    .fileinput >span{
        cursor: pointer;
    }
    .fileinput{
        height: 32px;
    }
    .bottom-10{
        margin-bottom: 10px;
    }
    .radiobtn{
        display: block;
        float: left;
        margin-left: 6px;
        cursor: pointer;
    }
    .radiobtn>img{
        width: 18px;
    }
    .msgdelete{
        position: absolute;
        top:10px;
        right: 10px;
        cursor: pointer;
    }
    .promise-people{
        background-color: #d1d8eb;
        border:1px solid #062982;
        padding: 15px 0 15px 15px;
        margin-top: 15px;
    }
    .add-promise{
        margin-top: 15px;
    }
    .commit{
        width: 54px!important;
    }
</style>
<script type="text/javascript" src="__PUBLIC__/js/PCASClass.js" ></script>
<link rel="stylesheet" href="__PUBLIC__/css/jquery.fileupload.css" type="text/css" />
<script>
    $(function(){
        $(".add_body").height(window.innerHeight-$("#add_body").offset().top-$("#tfoot_div").height()-40);
        $(window).resize(function(){
            $(".add_body").height(window.innerHeight-$("#add_body").offset().top-$("#tfoot_div").height()-40);
        })
    })
</script>
<!--职位类别start-->
<div class="sPopupDiv none" id="jobdiv" style="float:left;"></div>
<!--职位类别end-->
<div class="wrapper wrapper-content animated fadeIn col-md-12">
    <form class="form-horizontal" id="form" role="form" action="{:U('background/add')}" method="post" enctype="multipart/form-data" autocomplete="off">
        <input type='hidden' name="r" <present name="r">value="{$r}"</present>/>
        <input type='hidden' name="module" <present name="r">value="{$module}"</present>/>
        <input type='hidden' name="id" <present name="r">value="{$model_id}"</present>/>
        <input type='hidden' name="eid" value="{:I('id')}"/>
        <div class="ibox-content add_body" id="add_body">
            <div class="row full-height-scroll">
                <div class="col-md-12 add_body" >
                    <div class="">
                        <div class="row" >
                            <div class="col-md-8 add_body_title">
                                <div class="all-inline">
                                    <span class="sq-tag"></span>
                                    <div class="text-tag">
                                        <span>添加候选人信息</span>
                                    </div>
                                </div>
                            </div>
                            <div  id="resume-search-form" class="col-md-8 add_body_form" style="margin-left:15px;">
                                <input type="hidden" name="url" />
                                <div class="form-group tb-1">
                                    <label class="col-md-3 control-label">姓名：</label>
                                    <div class="col-md-6">
                                        <input class="form-control required name" type="text" id="name" name="name" value="">
                                    </div>
                                    <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                </div>
                                <div  class="form-group tb-1">
                                    <label class="col-md-3 control-label">岗位：</label>
                                    <div class="col-md-6">
                                        <input class="form-control required jobs" type="text" id="jobs" name="jobs" value="">
                                    </div>
                                    <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                </div>
                                <div  class="form-group tb-1">
                                    <label class="col-md-3 control-label">推荐公司名：</label>
                                    <div class="col-md-6">
                                        <input class="form-control required tocompany" type="text" id="tocompany" name="tocompany" value="">
                                    </div>
                                    <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                </div>
                                <div  class="form-group tb-1">
                                    <label class="col-md-3 control-label">所属行业：</label>
                                    <div class="col-md-6">
                                        <input class="form-control required industry" type="text" id="industry" name="industry" value="">
                                    </div>
                                    <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                </div>
                                <div  class="form-group tb-1">
                                    <label class="col-md-3 control-label">顾问名：</label>
                                    <div class="col-md-6">
                                         <input class="form-control required consultant" type="text" id="consultant" name="consultant" readonly="readonly" value="{$account}">
                                    </div>
                                    <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                </div>
                                <div  class="form-group tb-1">
                                    <label class="col-md-3 control-label">身份证号：</label>
                                    <div class="col-md-6">
                                        <input class="form-control required idnumber" type="text" id="idnumber" name="idnumber"  onkeydown="checkValue('idnum',this)" onkeyup="checkValue('idnum',this)" maxlength="18">
                                    </div>
                                    <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                    <div class="col-md-2 fileinput">
                                        <span class="btn btn-success btn-xs">上传身份证照片</span>
                                        <input type="file" class="btn btn-success btn-xs" accept="image/*" name="id" onchange="filechange(this)">
                                    </div>
                                    <div class="col-md-6 col-md-push-3">
                                        <img class="img-responsive" style="margin: 10px auto" >
                                    </div>
                                </div>

                                <div  class="form-group">
                                    <label class="col-md-3 control-label">学历证书：</label>
                                    <div class="col-md-11 col-md-push-3 education" style="margin-top: 10px;padding-top: 50px;background-color: rgb(230, 233, 240);position: relative">
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">毕业院校：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required edu-input" type="text"  name="school" value="">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required edu-input" name="newbyyx" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">学历类型：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required edu-input" type="text"  name="educationType" value="">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure1" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure1" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure1" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required edu-input" name="newxlnx" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">专业：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required edu-input" type="text" name="major" value="">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure2" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure2" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure2" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required edu-input" name="newzy" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">入学时间：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control text-center  required edu-input "  data-name="enter_time"  type="text" placeholder="年-月" id="eduenter" data-type="start" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;,maxDate:&quot;#F{$dp.$D(\'eduout\')}&quot;})" readonly="readonly" name="newentertime" style="height: 32px;width: 100%">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure3" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure3" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure3" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text"  class="form-control required edu-input" name="newentertime" placeholder="年-月" id="eduenter_add" data-type="start" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;})" readonly="readonly" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">毕业时间：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control text-center  required out_time edu-input" data-name="enter_time"  type="text" placeholder="年-月" id="eduout" data-type="end"  onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;,minDate:&quot;#F{$dp.$D(\'eduenter\')}&quot;})" readonly="readonly" name="outtime" style="height: 32px;width: 100%">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure4" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure4" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure4" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required edu-input" name="newouttime" placeholder="年-月" id="eduout_add" data-type="end" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;})"  readonly="readonly" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">证书编号：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required promisenum edu-input" type="text" name="zsbh" value="">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure5" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure5" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure5" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required edu-input" name="newedunum" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">信息来源：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required msgbelong edu-input" type="text" value="" name="xxly">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_1sure6"  checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure6" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_1sure6" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required edu-input" name="newedubelong" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <div class="col-md-2 fileinput col-md-push-9">
                                                <span class="btn btn-success btn-xs">上传学历证书照片</span>
                                                <input type="file" class="btn btn-success btn-xs" accept="image/*" name="edu" onchange="filechange(this)">
                                            </div>
                                            <div class="col-md-6">
                                                <img class="img-responsive" style="margin: 10px auto" >
                                            </div>
                                        </div>
                                        <div class="msgdelete" style="display: none"><img src="/Public/img/grayclose.png" style="width: 15px" alt=""></div>
                                    </div>
                                    <input type="button" class="btn btn-success btn-xs col-md-push-9 col-md-3 add-input" value="添加新的学历证书" style="margin-top: 10px">
                                </div>

                                <div  class="form-group">
                                    <label class="col-md-3 control-label">资格证书：</label>
                                    <div class="col-md-11 col-md-push-3 education" style="margin-top: 10px;padding-top: 50px;background-color: rgb(230, 233, 240);position: relative">
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">获得时间：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control text-center timerinput required enter_time qc-input" data-name="enter_time"  type="text" placeholder="年-月" id="qcenter" data-type="start" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;,maxDate:&quot;#F{$dp.$D(\'qcout\')}&quot;})"  readonly="readonly" name="hdsj" style="height: 32px;width: 100%">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_2sure"  checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required qc-input" name="newqcentertime" placeholder="年-月" id="qcenter_add" data-type="start" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;})" readonly="readonly" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">有效时间：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control text-center timerinput required out_time qc-input" data-name="enter_time"  type="text" placeholder="年-月" id="qcout" data-type="end"  onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;,minDate:&quot;#F{$dp.$D(\'qcenter\')}&quot;})" readonly="readonly" name="yxsj" style="height: 32px;width: 100%">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_2sure1"  checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure1" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure1" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required qc-input" name="newqcouttime" placeholder="年-月" id="qcout_add" data-type="end" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;})" readonly="readonly" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">证书类型：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required promisenum qc-input" type="text" value="" name="zsnx">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_2sure2"  checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure2" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure2" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required qc-input" name="newqctype" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">信息来源：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required msgbelong qc-input" type="text" value="" name="ly">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_2sure3"  checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure3" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure3" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required qc-input" name="newqcbelong" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">证书编号：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required promisenum qc-input" type="text" value="" name="bh">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="is_2sure4" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure4" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="is_2sure4" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required qc-input" name="newqcnum" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <div class="col-md-2 fileinput col-md-push-9">
                                                <span class="btn btn-success btn-xs">上传资格证书照片</span>
                                                <input type="file" class="btn btn-success btn-xs" accept="image/*" name="qc" onchange="filechange(this)">
                                            </div>
                                            <div class="col-md-6">
                                                <img class="img-responsive" style="margin: 10px auto" >
                                            </div>
                                        </div>
                                        <div class="msgdelete" style="display: none"><img src="/Public/img/grayclose.png" style="width: 15px" alt=""></div>
                                    </div>
                                    <input type="button" class="btn btn-success btn-xs col-md-push-9 col-md-3 add-input" value="添加新的资格证书" style="margin-top: 10px">
                                </div>
                                <div  class="form-group">
                                    <label class="col-md-3 control-label">工作经历：</label>
                                    <div class="col-md-11 col-md-push-3 education" style="margin-top: 10px;padding-top: 50px;background-color: rgb(230, 233, 240);position: relative">
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">公司名称：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required work-input " type="text" value="" name="gsmc">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="sur_1" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_1" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_1" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required work-input" name="newworkcompany" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">入职时间：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control text-center timerinput required enter_time work-input" data-name="enter_time"  type="text" placeholder="年-月" id="workenter" data-type="start" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;,maxDate:&quot;#F{$dp.$D(\'workout\')}&quot;})" readonly="readonly" name="rzsj" style="height: 32px;width: 100%">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="sur_2" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_2" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_2" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required work-input" name="newworkentertime" placeholder="年-月" id="workenter_add" data-type="start" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;})" readonly="readonly" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">离职时间：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control text-center timerinput required out_time work-input" data-name="enter_time"  type="text" placeholder="年-月" id="workout" data-type="end"  onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;,minDate:&quot;#F{$dp.$D(\'workenter\')}&quot;})" readonly="readonly" name="lzsj" style="height: 32px;width: 100%">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="sur_3" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_3" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_3" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required work-input" name="newworkouttime" placeholder="年-月" id="workout_add" data-type="end" onfocus="WdatePicker({dateFmt:&quot;yyyy-MM&quot;})" readonly="readonly" style="display: none"></div>
                                        </div>
                                        <div class="col-md-12 bottom-10">
                                            <lable class="col-md-2 control-label">任职职位：</lable>
                                            <div class="col-md-4">
                                                <input class="form-control required promisenum work-input" type="text" value="" name="rzzw">
                                            </div>
                                            <div class="col-md-3 radiodiv" style="height: 32px;padding-top: 3px">
                                                <label class="radiobtn"><input type="radio" name="sur_4" checked="checked" value="0"><img src="/Public/img/true.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_4" value="1"><img src="/Public/img/wrong.png" alt=""></label>
                                                <label class="radiobtn"><input type="radio" name="sur_4" value="2"><img src="/Public/img/notsure.png" alt=""></label>
                                            </div>
                                            <div class="col-md-3"><input type="text" class="form-control required work-input" name="newworkposition" style="display: none"></div>
                                        </div>
                                        <input type="text" value="1" class="witness-count work-input" readonly="readonly">
                                        <div class="col-md-12 bottom-10 p-p">
                                            <lable class="col-md-2 control-label">证明人：</lable>
                                            <div class="col-md-11  promise-people">
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">姓名：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wxm">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">岗位：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wgw">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">电话：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wtel">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">与被调查人关系：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wgx">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">调查方式：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wdcfs">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">在职期间工作情况：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wqk">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">是否有违纪违规/不良记录：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wjl">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">离职原因：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wreason">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">有否培训协议：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wpxxy">
                                                    </div>
                                                </div>
                                                <div class="col-md-10 col-md-push-2 bottom-10">
                                                    <lable class="col-md-5 col-md-pull-3 control-label">有否竞业协议：</lable>
                                                    <div class="col-md-4 col-md-pull-3">
                                                        <input type="text" class="form-control required witness-input" name="wjzxy">
                                                        <!--<input type="text" class="form-control required witness-input data-for" style="display: none">-->
                                                    </div>
                                                </div>
                                                <div class="msgdelete" style="display: none;"><img src="/Public/img/grayclose.png" style="width: 15px" alt=""></div>
                                            </div>
                                            <div class="col-md-2 col-md-push-9 add-promise"><input class="button btn btn-success btn-xs" type="button" value="添加证明人"></div>
                                        </div>
                                        <div class="msgdelete" style="display: none"><img src="/Public/img/grayclose.png" style="width: 15px" alt=""></div>
                                    </div>
                                    <input type="button" class="btn btn-success btn-xs col-md-push-9 col-md-3 add-input" value="添加新的工作经历" style="margin-top: 10px">
                                </div>

                                <div  class="form-group tb-1">
                                    <label class="col-md-3 control-label">备注：</label>
                                    <div class="col-md-7">
                                        <textarea name="bz" id="bz" cols="30" rows="5" class="form-control consultant" maxlength="200"></textarea>
                                    </div>
                                </div>

                                <volist name="field_list['data']" id="vo" key="key">
                                    <div class="form-group"  style="display: none;">
                                        <label class="col-md-4 control-label">{$vo.name}：</label>
                                        <if condition="$vo['form_type'] == 'textarea'">
                                            <if condition = "$vo['tip_start'] eq 1">
                                                <div class="col-md-6">
                                                    <textarea class="form-control" id="description" name="description" rows="5"></textarea>
                                                </div>
                                                <div class="col-md-2"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                                <else/>
                                                <div class="col-md-8">
                                                    <textarea class="form-control" id="description" name="description" rows="5"></textarea>
                                                </div>
                                            </if>
                                            <elseif condition="$vo['form_type'] == 'address'"/>
                                            <if condition = "$vo['tip_start'] eq 1">
                                                <div class="col-md-7">
                                                    {$vo.html}
                                                </div>
                                                <div class="col-md-1"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                                <else/>
                                                <div class="col-md-8">
                                                    {$vo.html}
                                                </div>
                                            </if>
                                            <else/>
                                            <div class="col-md-6">
                                                {$vo.html}
                                            </div>
                                            <if condition = "$vo['tip_start'] eq 1 || $vo['field'] eq 'customer_id'">
                                                <div class="col-md-2"><span style="color: red;line-height: 32px;margin-left: 10px;">*</span></div>
                                                <else/>
                                                <div class="col-md-2"></div>
                                            </if>
                                        </if>
                                    </div>
                                </volist>
                            </div>
                            <div class="col-md-1 pull-right">
                                <!-- <div style="height: 100%; border-right: 1px dashed gray;">&nbsp;sadf</div> -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div id="tfoot_div" class="clearfix">
            <div class="clearfix" id="tfoot_page">
                <div class="ibox-content" style="border-top: none;">
                    <div class="col-sm-offset-2" style="text-align:center;margin-left:0px;">
                        <button class="btn btn-primary commit" value="保存">保存</button>
                        <input class="btn btn-default" type="button" onclick="window.location='/index.php?m=background&a=index_external'" value="{:L('RETURN')}"/>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="" style="display:none;" id="dialog-validate" title="{:L('TEST_RESULTS')}">
    {:L('HAVE_THE_FOLLOWING_PRODUCTS_ARE_SIMILAR_TO_THE_PRODUCT_NAME')}
    <div id="search_content"></div>
</div>
<div style="display:none;"  id="dialog-resume" title="粘贴简历">
    <div class="form-group">
        <label class="col-sm-1 control-label ng-binding">文件名称</label>
        <div class="col-sm-11">
           <!-- <input class="form-control ng-pristine ng-untouched ng-valid" type="text">-->
        </div>
        <div class="col-sm-12">
            <textarea class="msd-elastic form-control parse-content" style="margin-top: 10px;height: 280px;width: 100%;outline: none;resize: none; overflow: hidden; word-wrap: break-word;"></textarea>
        </div>
    </div>
</div>
<div class="" style="display:none;" id="dialog-business" title="选择项目">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<link href="__PUBLIC__/css/selector.css" rel="stylesheet" />
<script type="text/javascript" src="__PUBLIC__/js/uploadPreview.js"></script>
<script src="__PUBLIC__/js/citydata.js"></script>
<script src="__PUBLIC__/js/cityselector_o.js"></script>

<script type="text/javascript">


    //    lieselect();
    //初始化上传图片
    $("body").on('click','input[type="file"]', function(){
//	var selector = $(this).attr('id');
//	$("#"+selector).uploadPreview({ Img: selector+"_prev", Width: 120, Height: 120 });
    });

    function del(data) {
        $(data).parent().remove();
    }
    function filechange(data){
        var files = $(data).prop('files');//获取到文件列表
        if(files.length == 0){
            alert('请选择文件');
            $(data).parent().next().children('img').attr("src", "");
        }else{
            /*var url = '';
            var reader = new FileReader();//新建一个FileReader
            reader.readAsText(files[0], "UTF-8");//读取文件
            reader.onload = function(evt){ //读取完文件之后会回来这里
                var fileString = evt.target.result;
            }*/
            $(data).parent().next().children('img').attr("src", window.URL.createObjectURL(files[0]));
        }
    }
    $(document).ready(function(){
        $("input[value='2']").on("click",function () {
           $(this).parent().parent().next().children("input[type='text']").val('notsure');
        });
        $("input[value='0']").on("click",function () {
            $(this).parent().parent().next().children("input[type='text']").val('sure');
        });
        $("input[value='0']").parent().parent().next().children("input[type='text']").val('sure');
        //检测是否填写所有文本框，若已填写完毕则提交
        $(".commit").off().on("click",function () {
            //验证
            var goon = isNull();
            //提交或返回未填写提示
            if(goon==0&&$('.spanerror').length<1){
                var files = $(document).find("input[type='file']");
                var formFile = new FormData();
                //取得图片
                files.each(function () {
                    if($(this).val()){
                        formFile.append($(this).attr("name"),$(this)[0]["files"][0]);
                    }
                });
                //取得external_background表数据
                var tb1 = $(document).find(".tb-1");
                var tbData1 = new Array();
                tb1.each(function () {
                   let text = $(this).find("input[type='text']").val()||$(this).find("textarea").val();
                   tbData1.push(text);
                })
                formFile.append("bg",tbData1);
                //取得external_background_edu表数据
                var tb2 = $(document).find(".edu-input");
                var tbData2 = new Array();
                tb2.each(function () {
                    let text = $(this).val();
                    tbData2.push(text);
                });
                formFile.append("edu",tbData2);
                //取得external_background_qc表数据
                var tb3 = $(document).find(".qc-input");
                var tbData3 = new Array();
                tb3.each(function () {
                    let text = $(this).val();
                    tbData3.push(text);
                });
                formFile.append("qc",tbData3);
                //取得external_background_work表数据
                var tb4 = $(document).find(".work-input");
                var tbData4 = new Array();
                tb4.each(function () {
                    let text = $(this).val();
                    tbData4.push(text);
                });
                formFile.append("work",tbData4);

                //取得external_background_witness表数据
                var tb5 = $(document).find(".witness-input");
                var tbData5 = new Array();
                tb5.each(function () {
                    let text = $(this).val();
                    tbData5.push(text);
                });
                formFile.append("witness",tbData5);
               $.ajax({
                   url:"{:U('background/add_external')}",
                   type:"post",
                   data:formFile,
                   processData :false,
                   contentType :false, // 不设置Content-type请求头
                   success:function (msg) {
                        if(msg=="true"){
                            swal({
                                title:'保存成功',
                                text:'点击确定返回上一页',
                                type:"success",
                                confirmButtonText: "确定"
                            },function (isConfirm) {
                                if(isConfirm){
                                    window.location.href="/index.php?m=background&a=index_external";
                                }
                            });
                        }
                   },
                   error:{

                   },
                   dataType:"json"
               })
            }else{
               /* alert_crm("还有未输入的必填文本框！")*/
            }
        });
        //验证文本框输入值
        $(document).find("input[type='text']").on("keyup",function () {
            /*console.log($(this));*/
        })
        //新建文本框
        var addclickcount = 0;
        $(".add-input").on("click",function () {
            addclickcount++;
            var neweducation = "";
            if($(this).parent().children().eq(1).children(".p-p").length==1){
                neweducation = $(this).parent().children().eq(1).clone(true);
                neweducation.children(".p-p").children(".promise-people").eq(0).children().each(function () {
                   $(this).children("div").children("input").val("");
                });
                var propeople = neweducation.children(".p-p").children(".promise-people").length;
                for(let i =0;i<propeople;i++){
                    neweducation.children(".p-p").children(".promise-people").eq(1).remove();
                }
                //重置证明人数
               neweducation.find(".witness-count").val("1");
            }else{
                neweducation = $(this).parent().children().eq(1).clone(true);
            }
            var n = 0;
            //为文本输入框添加新name
            let cn = 0;
            neweducation.find('input[type="text"]').each(function () {
                let name = $(this).attr('name')==null?'newName'+addclickcount+'_'+cn:$(this).attr('name')+addclickcount+'_'+cn;
                $(this).attr('name',name);
                cn++;
            });
            //radio 分组
            neweducation.children().each(function () {
                n++;
                $(this).children(".col-md-4").children("input").val("");
                /*var htmlName = $(this).children(".col-md-4").children("input").attr('name');
                $(this).children(".col-md-4").children("input").attr("name",htmlName+addclickcount);*/
                $(this).children(".col-md-3").eq(0).children("label").each(function () {
                    var inputradio =  $(this).children("input");
                    inputradio.attr("name","addsure_"+n+"_"+addclickcount);
                    inputradio.prop("checked",false);
                });
                $(this).children(".col-md-3").eq(1).children("input").css("display","none");
                $(this).children(".col-md-3").eq(1).children("input").val("");
            });
            //radio 默认选择设置
            neweducation.find('.radiodiv').each(function () {
               $(this).children().find('input[type="radio"]').eq(0).prop("checked","checked");
            });
            //隐藏input默认值
            neweducation.find('input[type="text"]').each(function () {
                if($(this).css('display')=='none'){
                    $(this).val('sure');
                }
            });
            //重置时间选择框属性
            neweducation.find('input[type="text"]').each(function () {
                if($(this).attr('placeholder')=='年-月'){
                    let obj =$(this);
                    obj.removeAttr('onfocus');
                    obj.attr('id',obj.attr('id')+'_'+addclickcount);
                    if(obj.attr('data-type')=='start'){
                        obj.on('click',function () {
                            WdatePicker({dateFmt:'yyyy-MM',maxDate:'#F{$dp.$D('+obj.attr('id').replace(/enter/,'out')+')}'})
                        });
                    }else{
                        obj.on('click',function () {
                            WdatePicker({dateFmt:'yyyy-MM',minDate:'#F{$dp.$D('+obj.attr('id').replace(/out/,'enter')+')}'})
                        });
                    }
                }
            });
            $(this).before(neweducation);
            //清空上传按钮及预览图
            var thisbefore = $(this).prev();
            thisbefore.children(".msgdelete").css("display","block");
            var input = thisbefore.children(".msgdelete").prev().children().eq(0).children("input");
            input.val("");
            var pic = thisbefore.children(".msgdelete").prev().children().eq(1).children("img");
            pic.removeAttr("src");
            //添加上传input name
            var fileInput = $(this).prev().find("input[type='file']");
            var fileInputCount = fileInput.parent().parent().parent().parent().children().length-3;
            fileInput.attr("name",$(this).parent().find("input[type='file']").last().attr("name")+fileInputCount);

        });
        let promiseClick = 0;
        $(".add-promise").on("click",function () {
            var promise = $(this).parent().children().eq(1).clone(true);
            promiseClick++;
            promise.children().each(function () {
                $(this).children("div").children("input").val("");
                $(this).children("div").children("input").attr("name",$(this).children("div").children("input").attr("name")+promiseClick);
            });
            promise.children(".msgdelete").css("display","block");
            var witnessCount = parseInt($(this).parent().parent().children(".witness-count").val());
            if(witnessCount<4){
                $(this).parent().parent().children(".witness-count").val(witnessCount+1);
                $(this).before(promise);
            }else{
                alert_crm('最多添加四名证明人！');
            }
        })
        $(".msgdelete").on("click",function () {
            var obj = $(this);
            var check = 0;
            obj.parent().parent().children().last().prev().is(obj.parent())?check=0:check=1;
            if(check==0){
                obj.parent().fadeOut(500);
                obj.parent().parent().parent().find('.witness-count').val(obj.parent().parent().find('.promise-people').length-1);
                setTimeout(function () {
                    obj.parent().remove();
                },1)
            }else{
                alert_crm("请从最后一个删除！");
            }

        })
        $(".radiobtn").on("click",function () {
            if($(this).children('input').attr('value')==1){
                $(this).parent().next().children("input").css("display","block");
                $(this).parent().next().children("input").val("");
                $(this).parent().next().children("input").attr("placeholder","请输入实际信息！");
            }else{
                $(this).parent().next().children("input").css("display","none");
            }
        })
        $(".idbtn").on("click",function () {
            if (!(window.File || window.FileReader || window.FileList || window.Blob)) {
                alert('请使用Chrome浏览器');
            }else{
                $(".idfile").click();
            }
        });
        $('#bgsave').off().on("click",function(){
            var name = $("#name").val().trim();
            var industry = $("#industry").val().trim();
            var department = $("#department").val().trim();
            var school= $("#school").val().trim();
            var major=$("#major").val().trim();
            var education = $("#education").val().trim();
            var data = {"s_name":name,"industry":industry,"department":department,"school":school,"major":major,"education":education};
            var bgmsgs = new Array();
            $(".panel-body3").each(function () {
                var bgmsg ={};
                $(this).children("div").each(function () {
                    $(this).children("div").children("input").each(function () {
                        if($(this).val()) {
                            bgmsg[$(this).attr("data-name")] = $(this).val().trim();
                        }else{
                            return false;
                            alert_crm("请输入完整信息！");
                        }
                    })
                });
                if(JSON.stringify(bgmsg) != "{}"){
                    if($(this).attr("data-id")){
                        bgmsg['id']=$(this).attr("data-id");
                        bgmsgs.push(bgmsg);
                    }else{
                        bgmsgs.push(bgmsg);
                    }
                }else{
                    return false;
                }
            });
            if(JSON.stringify(bgmsgs) != "{}"){
                data.bgmsgs = bgmsgs;
            }
            if(name && industry && department && school && major &&education){
                $.ajax({
                    url:"/index.php?m=background&a=add",
                    type:"post",
                    async:false,
                    dataType:"json",
                    data:data,
                    success:function (success) {
                        if(success.status){
                            alert_crm("提交成功！");
                            setTimeout(function () {
                                window.location.href="/index.php?m=background&a=index";
                            },1000)
                        }
                    },
                    error:function (error) {
                        alert_crm("提交失败！");
                    }
                });
            }
        });
        $(document).on("click",".btnclosee",function (event) {
            var width=$("#right-sidebar-log").width();
            if($("#right-sidebar-log").css('right') == '0px'){
                $("#right-sidebar-log").animate({right:'-'+width+'px'}, 400);
            }
            $("#linetoggle").remove();
        })

        $(".jCitySelector").loadCitySelector();

        $('#save_submit').prop('disabled',false);
        /*form表单验证*/
        $("#form").validate({
            submitHandler:function(form){
            }
        });

        $("#uploadresume").on("change",function () {
            var dataform = new FormData();
            dataform.append("file",$('#uploadresume')[0].files[0]);
//            dataform.append("resume",$('#uploadresume')[0].files[0]);
//            dataform.append("secret_key","LR1snHUsXWzLHehzcZRbk9aENhZ0Nk0000047aff");

            $.ajax({
//                url:"https://api.youyun.com/v1/resume",
                url:"/index.php?m=parse&a=index",
                type:"post",
                data:dataform,
                processData:false,
                contentType:false,
                success:function(data){
                    console.log(data);
                    if(data){
//                        location = "/index.php?m=product&a=edit&id="+data;
                    }
//                    var content=JSON.parse(data);
//                    //内容解析显示在页面中
//                    $("#name").val(content.name);
//                    var sex=content.sex;
//                    if(sex=="女"){
//                        $("input[name=sex]").eq(1).prop("checked","checked");
//                    }
//                    $("#telphone").val(content.telphone);
//                    $("#birthday").val(content.birthday);
////                    $("#dqs").val(content.living);
//                    $("#email").val(content.email);
//                    $("#curSalary").val(content.wage_current);
//                    $("input[name=url]").val(content.url);
//                    $("input[data-selector=dqs]").attr("value",content.living);
//                    $("input[data-selector=industry]").attr("value",content.hy);
//                    $("input[data-selector=job_class]").attr("value",content.job_classid);
////                    $("#dqs").val(content.living);
////                    $("input[data-selector=dqs]").val(content.living);
////                    $("input[data-selector=wantdqs]").val(wantdqs);
//                    $("#wantdqs").val(content.wage_current);
////                    lieselect();
//                    var edu=content.edu;
//                    $("#education option").each(function () {
//                        if(edu==$(this).attr("value")){
//                            $(this).attr("selected",true);
//                        }
//                    })
//
//                    var worksdata = content.workExp;
//                    var edudata = content.eduExps;
//                    var prodata = content.proExp;
//                    if(worksdata){
//                        $(".workExp .panel-body3").remove();
//                        $.each(worksdata,function(i,v){
//                            addWork(v);
//                        });
//                    }
//
//                    if(edudata){
//                        $(".eduExp .addedu").hide();
//                        $.each(edudata,function(i,v){
//                            addEdu(v);
//                        });
//                        $("#degree option").each(function () {
//                            if($(this).parent().attr("data-value")==$(this).val()){
//                                $(this).attr("selected","selected");
//                            }
//                        })
//                    }
//
//                    if(prodata){
//                        $(".projectExp .addpro").hide();
//                        $.each(prodata,function(i,v){
//                            addPro(v);
//                        });
//                    }

                    //出现右边的滑框
//                    if($("#right-sidebar-log").css('right') != '0px'){
//                        $("#right-sidebar-log").animate({right:'0px'}, 600);
//                        $("#right-sidebar-log").css("width","60%");
//                    }
//                    $('#sidebar-container').html("<div class='btn btn-primary btnclosee'>关闭</div><textarea class='resume_area'>"+content.content+"</textarea>");
//                    if($("#linetoggle").length>0){
//                        return
//                    }else{
//                        $('#sidebar-container').before("<div id='linetoggle'><div class='btn_ico'></div></div>");
//                    }
                },
                error:function(e){
                    alert("错误！！");
//                    window.clearInterval(timer);
                }
            });
        })
    });

    $(function () {
        $(document).on('click','.textdialog',function () {
            $('#dialog-resume').dialog('open');
        });

        $('#business_name').click(function () {
            $('#dialog-business').dialog('open');
            $('#dialog-business').load("{:U('business/listdialog')}");
        });
    })

    $("#dialog-business").dialog({
        autoOpen: false,
        modal: true,
        width: 800,
        height: 400,
        close: function () {
            $(this).html("");
        },
        buttons: {
            "{:L('OK')}": function () {
                var item = $('input:radio[name="business"]:checked').val();
                var name = $('input:radio[name="business"]:checked').parent().next().html();
                if(item){
                    $('#business_id').val(item);
                    $('#business_name').val(name);
                }
                $(this).dialog("close");
            },
            "{:L('CANCEL')}": function () {
                $(this).dialog("close");
            }
        },
        position:["center",100]
    });

    $("#dialog-resume").dialog({
        autoOpen: false,
        modal: true,
        width: 1100,
        maxHeight: 500,
        buttons: {
            "确定": function () {

                $.ajax({
                    type:"post",
                    url:"{:U('parse/parse_action')}",
                    data:{
                        content:$(".parse-content").val()
                    },
                    success:function(data){
                        var content=JSON.parse(data);
                        //内容解析显示在页面中
                        $("#name").val(content.name);
                        var sex=content.sex;
                        if(sex=="女"){
                            $("input[name=sex]").eq(1).prop("checked","checked");
                        }
                        $("#telphone").val(content.telphone);
                        $("#birthday").val(content.birthday);
                        $("input[name=url]").val(content.url);
//                    $("#dqs").val(content.living);
                        $("#email").val(content.email);
                        $("#curSalary").val(content.wage_current);
//                    $("#dqs").val(content.living);
                        $("input[data-selector=dqs]").attr("value",content.living);
                        $("input[data-selector=industry]").attr("value",content.hy);
                        $("input[data-selector=job_class]").attr("value",content.job_classid);
//                    $("input[data-selector=dqs]").attr("value",content.living);
//                    $("input[data-selector=wantdqs]").val(wantdqs);
//                        $("#wantdqs").val(content.wage_current);

                        var edu=content.edu;
                        $("#education option").each(function () {
                            if(edu==$(this).attr("value")){
                                $(this).attr("selected",true);
                            }
                        })
                        var worksdata = content.workExp;
                        var edudata = content.eduExps;
                        var prodata = content.proExp;
                        if(worksdata){
                            $(".workExp .panel-body3").remove();
                            $.each(worksdata,function(i,v){
                                addWork(v);
                            });
                        }

                        if(edudata){
                            $(".eduExp .addedu").hide();
                            $.each(edudata,function(i,v){
                                addEdu(v);
                            });
                        }

                        if(prodata){
                            $(".projectExp .addpro").hide();
                            $.each(prodata,function(i,v){
                                addPro(v);
                            });
                        }

                        //出现右边的滑框
//                        if($("#right-sidebar-log").css('right') != '0px'){
//                            $("#right-sidebar-log").animate({right:'0px'}, 600);
//                            $("#right-sidebar-log").css("width","60%");
//                        }
//                        $('#sidebar-container').html("<div class='btn btn-primary btnclosee'>关闭</div><textarea class='resume_area'>"+content.content+"</textarea>");
                        if($("#linetoggle").length>0){
                            return
                        }else{
                            $('#sidebar-container').before("<div id='linetoggle'><div class='btn_ico'></div></div>");
                        }
                    }
                })

                //追加产品信息
                $(".se_product_").each(function(){

                });
                $(this).dialog("close");
            },
            "取消": function () {
                $(this).dialog("close");
            }
        },
        position: ["center", 100],
        close:function(){
//            $(this).html('');
        }
    });



    $(function () {
        $("body").on("click",".deletebtn",function () {
            var item=$(this).closest(".panel").find(".panel-body3");
            if(item.length==1){
                item.closest(".col-lg-9").find(".adddefault").show();
                item.parent().remove();
            }
            $(this).closest(".panel-body3").remove();
        })
    })

</script>


<include file="Public:footer" />



<div id="right-sidebar-log">
    <!--the css for jquery.mCustomScrollbar-->
    <link rel="stylesheet" href="__PUBLIC__/emoji/css/jquery.mCustomScrollbar.min.css"/>
    <!--the css for this plugin-->
    <link rel="stylesheet" href="__PUBLIC__/emoji/css/jquery.emoji.css"/>
    <!--(Optional) the js for jquery.mCustomScrollbar's addon-->
    <script src="__PUBLIC__/emoji/js/jquery.mousewheel-3.0.6.min.js"></script>
    <!--the js for jquery.mCustomScrollbar-->
    <script src="__PUBLIC__/emoji/js/jquery.mCustomScrollbar.min.js"></script>
    <!--the js for this plugin-->
    <script src="__PUBLIC__/emoji/js/jquery.emoji.js"></script>

    <!--<div class="sidebar-container" id="sidebar-container">-->

    <!--</div>-->
</div>

<style>

    .sidebar-container ul.nav-tabs li a{
        background: #fff !important;
        color: #a7b1c2 !important;
        font-weight: 600 !important;
        padding: 14px 20px 14px !important;
        border-right: none !important;
    }
    .sidebar-container nav{
        display: none;
    }
    .sidebar-container #page-wrapper{
        margin-left: 0px;
    }
    #sidebar-container{
        box-shadow: rgb(187, 187, 187) -1px 10px 10px;
        border: 2px solid rgb(238, 238, 238);
    }

    #right-sidebar-log{
        width: 60%;
        right: -60%;
        background-color: #fff;
        position: fixed;
        top: 60px;
        z-index: 1009;
        bottom: 0;
        box-shadow: -5px -5px 1px #ccc;
    }
    .witness-count{
        display: none;
    }
</style>
<script src="__PUBLIC__/resume_selector/common.21a64352.js"></script>
<script src="__PUBLIC__/resume_selector/resume.search.910ebde0.js "></script>